package cn.zyq.demo.system.config.consts.route;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 静态注入正确方式，
 * 只写setter，但是不能是静态的。
 * <p>
 * 参考：https://www.jianshu.com/p/149c5a951ffc
 */
@Component
@ConfigurationProperties(prefix = "route.prefix")
public class RoutePrefixConst {
    public static String h5;
    public static String mgt;
    public static String mp;
    public static String wx;
    public static String common;
    public static String error;

    public void setH5(String h5) {
        RoutePrefixConst.h5 = h5;
    }

    public void setMgt(String mgt) {
        RoutePrefixConst.mgt = mgt;
    }

    public void setCommon(String common) {
        RoutePrefixConst.common = common;
    }

    public void setError(String error) {
        RoutePrefixConst.error = error;
    }

    public void setWx(String wx) {
        RoutePrefixConst.wx = wx;
    }

    public void setMp(String mp) {
        RoutePrefixConst.mp = mp;
    }
}
